package com.paranoidmonkey.ode;

public class Vector3 {
	public float[] data;
	
	public Vector3(){
		data=new float[3];
	}
	
	public Vector3(float x,float y,float z){
		data=new float[3];
		data[0]=x;
		data[1]=y;
		data[2]=z;
	}
	protected Vector3(float[] d){
		data=d;
	}
	
	public float x(){
		return data[0];
	}
	public float y(){
		return data[1];
	}
	public float z(){
		return data[2];
	}

	public void setx(float val){
		data[0]=val;
	}
	public void sety(float val){
		data[1]=val;
	}
	public void setz(float val){
		data[2]=val;
	}
	
	public void move(float x,float y,float z){
		data[0]+=x;
		data[1]+=y;
		data[2]+=z;
	}
	public void move(Vector3 vec){
		data[0]+=vec.x();
		data[1]+=vec.y();
		data[2]+=vec.z();
	}

}
